3.7 \(\int \csc ^3(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx\)

Optimal. Leaf size=64 \[ -\frac {a^2 c \cot (e+f x)}{f}+\frac {a^2 c \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a^2 c \cot (e+f x) \csc (e+f x)}{2 f}+a^2 (-c) x \]

[Out]

-a^2*c*x+1/2*a^2*c*arctanh(cos(f*x+e))/f-a^2*c*cot(f*x+e)/f-1/2*a^2*c*cot(f*x+e)*csc(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {2966, 3770, 3767, 8, 3768} \[ -\frac {a^2 c \cot (e+f x)}{f}+\frac {a^2 c \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a^2 c \cot (e+f x) \csc (e+f x)}{2 f}+a^2 (-c) x \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^3*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]

[Out]

-(a^2*c*x) + (a^2*c*ArcTanh[Cos[e + f*x]])/(2*f) - (a^2*c*Cot[e + f*x])/f - (a^2*c*Cot[e + f*x]*Csc[e + f*x])/
(2*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2966

Int[sin[(e_.) + (f_.)*(x_)]^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.
)*(x_)]), x_Symbol] :> Int[ExpandTrig[sin[e + f*x]^n*(a + b*sin[e + f*x])^m*(A + B*sin[e + f*x]), x], x] /; Fr
eeQ[{a, b, e, f, A, B}, x] && EqQ[A*b + a*B, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && IntegerQ[n]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \csc ^3(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx &=\int \left (-a^2 c-a^2 c \csc (e+f x)+a^2 c \csc ^2(e+f x)+a^2 c \csc ^3(e+f x)\right ) \, dx\\ &=-a^2 c x-\left (a^2 c\right ) \int \csc (e+f x) \, dx+\left (a^2 c\right ) \int \csc ^2(e+f x) \, dx+\left (a^2 c\right ) \int \csc ^3(e+f x) \, dx\\ &=-a^2 c x+\frac {a^2 c \tanh ^{-1}(\cos (e+f x))}{f}-\frac {a^2 c \cot (e+f x) \csc (e+f x)}{2 f}+\frac {1}{2} \left (a^2 c\right ) \int \csc (e+f x) \, dx-\frac {\left (a^2 c\right ) \operatorname {Subst}(\int 1 \, dx,x,\cot (e+f x))}{f}\\ &=-a^2 c x+\frac {a^2 c \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a^2 c \cot (e+f x)}{f}-\frac {a^2 c \cot (e+f x) \csc (e+f x)}{2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.71, size = 95, normalized size = 1.48 \[ -\frac {a^2 c \left (-4 \tan \left (\frac {1}{2} (e+f x)\right )+4 \cot \left (\frac {1}{2} (e+f x)\right )+\csc ^2\left (\frac {1}{2} (e+f x)\right )-\sec ^2\left (\frac {1}{2} (e+f x)\right )+4 \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )-4 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+8 e+8 f x\right )}{8 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^3*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]

[Out]

-1/8*(a^2*c*(8*e + 8*f*x + 4*Cot[(e + f*x)/2] + Csc[(e + f*x)/2]^2 - 4*Log[Cos[(e + f*x)/2]] + 4*Log[Sin[(e +
f*x)/2]] - Sec[(e + f*x)/2]^2 - 4*Tan[(e + f*x)/2]))/f

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 138, normalized size = 2.16 \[ -\frac {4 \, a^{2} c f x \cos \left (f x + e\right )^{2} - 4 \, a^{2} c f x - 4 \, a^{2} c \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a^{2} c \cos \left (f x + e\right ) - {\left (a^{2} c \cos \left (f x + e\right )^{2} - a^{2} c\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + {\left (a^{2} c \cos \left (f x + e\right )^{2} - a^{2} c\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{4 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="fricas")

[Out]

-1/4*(4*a^2*c*f*x*cos(f*x + e)^2 - 4*a^2*c*f*x - 4*a^2*c*cos(f*x + e)*sin(f*x + e) - 2*a^2*c*cos(f*x + e) - (a
^2*c*cos(f*x + e)^2 - a^2*c)*log(1/2*cos(f*x + e) + 1/2) + (a^2*c*cos(f*x + e)^2 - a^2*c)*log(-1/2*cos(f*x + e
) + 1/2))/(f*cos(f*x + e)^2 - f)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)-2/f*((-4*tan((f*x+exp(1))/2)^2*a^2*c-16*tan((f*x+exp(1))/2)*a^2*c)/64+(-6*tan((f*x+exp(1))/2)^2*a^2*c+4*t
an((f*x+exp(1))/2)*a^2*c+a^2*c)*1/16/tan((f*x+exp(1))/2)^2+2*a^2*c/2*(f*x+exp(1))/2+a^2*c/4*ln(abs(tan((f*x+ex
p(1))/2))))

________________________________________________________________________________________

maple [A]  time = 0.45, size = 80, normalized size = 1.25 \[ -a^{2} c x -\frac {a^{2} c e}{f}-\frac {a^{2} c \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2 f}-\frac {a^{2} c \cot \left (f x +e \right )}{f}-\frac {a^{2} c \cot \left (f x +e \right ) \csc \left (f x +e \right )}{2 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^3*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x)

[Out]

-a^2*c*x-1/f*a^2*c*e-1/2/f*a^2*c*ln(csc(f*x+e)-cot(f*x+e))-a^2*c*cot(f*x+e)/f-1/2*a^2*c*cot(f*x+e)*csc(f*x+e)/
f

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 105, normalized size = 1.64 \[ -\frac {4 \, {\left (f x + e\right )} a^{2} c - a^{2} c {\left (\frac {2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 2 \, a^{2} c {\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} + \frac {4 \, a^{2} c}{\tan \left (f x + e\right )}}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="maxima")

[Out]

-1/4*(4*(f*x + e)*a^2*c - a^2*c*(2*cos(f*x + e)/(cos(f*x + e)^2 - 1) - log(cos(f*x + e) + 1) + log(cos(f*x + e
) - 1)) - 2*a^2*c*(log(cos(f*x + e) + 1) - log(cos(f*x + e) - 1)) + 4*a^2*c/tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 12.26, size = 163, normalized size = 2.55 \[ \frac {a^2\,c\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{2\,f}-\frac {a^2\,c\,\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{2\,f}-\frac {2\,a^2\,c\,\mathrm {atan}\left (\frac {2\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )-2\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f}-\frac {a^2\,c\,\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{2\,f}-\frac {a^2\,c\,{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{8\,f}+\frac {a^2\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{8\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + a*sin(e + f*x))^2*(c - c*sin(e + f*x)))/sin(e + f*x)^3,x)

[Out]

(a^2*c*tan(e/2 + (f*x)/2))/(2*f) - (a^2*c*log(sin(e/2 + (f*x)/2)/cos(e/2 + (f*x)/2)))/(2*f) - (2*a^2*c*atan((2
*cos(e/2 + (f*x)/2) + sin(e/2 + (f*x)/2))/(cos(e/2 + (f*x)/2) - 2*sin(e/2 + (f*x)/2))))/f - (a^2*c*cot(e/2 + (
f*x)/2))/(2*f) - (a^2*c*cot(e/2 + (f*x)/2)^2)/(8*f) + (a^2*c*tan(e/2 + (f*x)/2)^2)/(8*f)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - a^{2} c \left (\int \left (- \sin {\left (e + f x \right )} \csc ^{3}{\left (e + f x \right )}\right )\, dx + \int \sin ^{2}{\left (e + f x \right )} \csc ^{3}{\left (e + f x \right )}\, dx + \int \sin ^{3}{\left (e + f x \right )} \csc ^{3}{\left (e + f x \right )}\, dx + \int \left (- \csc ^{3}{\left (e + f x \right )}\right )\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**3*(a+a*sin(f*x+e))**2*(c-c*sin(f*x+e)),x)

[Out]

-a**2*c*(Integral(-sin(e + f*x)*csc(e + f*x)**3, x) + Integral(sin(e + f*x)**2*csc(e + f*x)**3, x) + Integral(
sin(e + f*x)**3*csc(e + f*x)**3, x) + Integral(-csc(e + f*x)**3, x))

________________________________________________________________________________________